<script setup lang="ts">
import { Plus } from "@element-plus/icons-vue";
import { ref } from "vue";
const bntlist = [
  { id: 1, name: "我的客户" },
  { id: 2, name: "我全部的客户" },
  { id: 3, name: "我标☆客户" },
  { id: 4, name: "我停用客户" },
  { id: 5, name: "我创建" },
];
const oneid = ref(1);
const itemid = (id: number) => {
  oneid.value = id;
};
</script>
<template>
  <div>
    <div>
      <el-button @click="show" class="m-2" type="primary"
        ><el-icon :size="20"><Plus /></el-icon>新增</el-button
      >
      <el-input
        class="m-2"
        style="width: 150px"
        placeholder="关键字"
      ></el-input>
      <el-button
        >搜索
        <el-icon class="el-icon--right">
          <arrow-down />
        </el-icon>
      </el-button>

      <el-button
        v-for="item in bntlist"
        @click="itemid(item.id)"
        :key="item.id"
        :class="{ on: item.id == oneid }"
        >{{ item.name }}</el-button
      >
    </div>
  </div>
</template>
<style scoped>
.on {
  background-color: transparent;
  display: inline-block;
  padding: 6px 12px;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  margin-right: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-color: #4e4f50;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
}

.el-button {
  margin: 0;
  color: black;
}
.el-button:focus {
  color: black;
}
.el-button:hover {
  background: none;
  border-color: #4e4f50;

  color: black;
}
.mar {
  margin-right: 10px;
}
</style>
